#include "caidanframe.h"
#include "ui_caidanframe.h"
#include "qqtwidgets.h"

CaidanFrame::CaidanFrame ( QWidget* parent ) :
    QWidget ( parent ),
    ui ( new Ui::CaidanFrame )
{
    ui->setupUi ( this );

    connect ( ui->widget, SIGNAL ( click() ),
              this, SIGNAL ( sigBackClick() ) );

    moveHCenter ( ui->label, this );
    moveHCenter ( ui->widget, this );
}

CaidanFrame::~CaidanFrame()
{
    delete ui;
}

void CaidanFrame::setTitle ( QString title )
{
    ui->label->setText ( title );
}

void CaidanFrame::setBackButton ( QString name, QString pix )
{
    ui->widget->setText ( name );
    ui->widget->setIcon ( pix );
}
